// 小练习1：请分析以下代码的运行过程

console.log('global');
setTimeout(function () {
    console.log('timeout1');
    new Promise(function (resolve1) {
        console.log('promise1');
        resolve1();
    }).then(function () {
        console.log('then1')
    })

    setTimeout(function () {
        console.log('timeout2');
        new Promise(function (resolve2) {
            console.log('promise2');
            resolve2();
        }).then(function () {
            console.log('then2')
        })
    })
});